import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
import { filters } from './common/filters.js'
// 定义全局自定义过滤器
Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key])
})
// 引入防抖节流函数文件
import {throttling,chattering} from './common/dbucTrtl.js'
// 在Vue实例上扩展全局方法
Vue.prototype.$throttling = throttling;
Vue.prototype.$chattering = chattering;

Vue.prototype.$pageGo = (url) => {
	uni.navigateTo({url})
}
Vue.prototype.$callPhone = (num) => {
	uni.makePhoneCall({
		phoneNumber: num //仅为示例
	});
}
Vue.prototype.$clipCz = (num) => {
	uni.setClipboardData({
		data:num,
		success: function () {
			console.log('success');
		}
	});
}
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif